package com.beidouapp.schedule;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class UpdateRedisDataTask {


	public static boolean isExecute() {
		String master = System.getProperty("server.master");
		if (master == null || !master.equalsIgnoreCase("true")) {
			return true;
		}
		return false;
	}

	// 定时任务（每天执行一次任务）
	@Scheduled(cron = "0 0 2 * * ?") 
	public void updateSepcialTemplateData() {
		if (!isExecute())
			return;
		// 更新缓存数据
		// specialTemplateService.findAodbFlightInfoList(begin, end); 

	}

}
